package com.ruoyi.user.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * 用户信息对象 user
 * 
 * @author ruoyi
 * @date 2025-10-13
 */
public class User extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 用户ID */
    private Long id;

    /** 用户名 */
    @Excel(name = "用户名")
    private String username;

    /** 手机号（登录账号） */
    @Excel(name = "手机号", readConverterExp = "登=录账号")
    private String phone;

    /** 加密密码 */
    @Excel(name = "加密密码")
    private String password;

    /** 头像URL */
    @Excel(name = "头像URL")
    private String avatar;

    /** 昵称 */
    @Excel(name = "昵称")
    private String nickname;

    /** 性别（1男/2女/0未知） */
    @Excel(name = "性别", readConverterExp = "1=男/2女/0未知")
    private Integer gender;

    /** 是否会员（1是/0否） */
    @Excel(name = "是否会员", readConverterExp = "1=是/0否")
    private Integer isVip;

    /** 会员过期时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "会员过期时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date vipExpireTime;

    /** 推荐人用户ID */
    @Excel(name = "推荐人用户ID")
    private Long referrerId;

    /** 常居地 */
    @Excel(name = "常居地")
    private String residentAddress;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }

    public void setUsername(String username) 
    {
        this.username = username;
    }

    public String getUsername() 
    {
        return username;
    }

    public void setPhone(String phone) 
    {
        this.phone = phone;
    }

    public String getPhone() 
    {
        return phone;
    }

    public void setPassword(String password) 
    {
        this.password = password;
    }

    public String getPassword() 
    {
        return password;
    }

    public void setAvatar(String avatar) 
    {
        this.avatar = avatar;
    }

    public String getAvatar() 
    {
        return avatar;
    }

    public void setNickname(String nickname) 
    {
        this.nickname = nickname;
    }

    public String getNickname() 
    {
        return nickname;
    }

    public void setGender(Integer gender) 
    {
        this.gender = gender;
    }

    public Integer getGender() 
    {
        return gender;
    }

    public void setIsVip(Integer isVip) 
    {
        this.isVip = isVip;
    }

    public Integer getIsVip() 
    {
        return isVip;
    }

    public void setVipExpireTime(Date vipExpireTime) 
    {
        this.vipExpireTime = vipExpireTime;
    }

    public Date getVipExpireTime() 
    {
        return vipExpireTime;
    }

    public void setReferrerId(Long referrerId) 
    {
        this.referrerId = referrerId;
    }

    public Long getReferrerId() 
    {
        return referrerId;
    }

    public void setResidentAddress(String residentAddress) 
    {
        this.residentAddress = residentAddress;
    }

    public String getResidentAddress() 
    {
        return residentAddress;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("username", getUsername())
            .append("phone", getPhone())
            .append("password", getPassword())
            .append("avatar", getAvatar())
            .append("nickname", getNickname())
            .append("gender", getGender())
            .append("isVip", getIsVip())
            .append("vipExpireTime", getVipExpireTime())
            .append("referrerId", getReferrerId())
            .append("residentAddress", getResidentAddress())
            .append("createTime", getCreateTime())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
